package org.walkerljl.boss.admin.controller.identity;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.walkerljl.boss.domain.identity.App;
import org.walkerljl.boss.domain.monitor.MonitorResult;
import org.walkerljl.boss.support.mvc.entity.ObjectIdentifier;
import org.walkerljl.boss.support.mvc.template.JqueryDatatableCurdTemplate;
import org.walkerljl.boss.support.sdk.auth.annotation.Authentication;
import org.walkerljl.boss.support.sdk.auth.entity.Menu;
import org.walkerljl.boss.support.service.JqueryDatatableBaseService;
import org.walkerljl.boss.service.identity.AppService;
import org.walkerljl.commons.trace.TraceUtils;

import javax.annotation.Resource;

/**
 * 应用
 *
 * @author lijunlin
 */
@Controller
@Authentication
@RequestMapping(value = "/identity/app", method = {RequestMethod.POST, RequestMethod.GET})
public class AppController extends JqueryDatatableCurdTemplate<App> {

    @Resource
    private AppService appService;

    public AppController() {
        ObjectIdentifier objectIdentifier = new ObjectIdentifier("应用管理", "/identity/app");
        objectIdentifier.setParentMenus(new Menu[]{new Menu("权限管理", null)});
        setObjectIdentifier(objectIdentifier);
    }

    @Override
    public JqueryDatatableBaseService<Long, App> getJqueryDatatableBaseService() {
        return appService;
    }
}